🎖️GitЯра🎖️
Node / meshtastic / Meshtastic-Android / files / app / src / fdroid / kotlin / org / meshtastic / app / analytics / FdroidPlatformAnalytics.kt
Displaying Raw • Download
app/src/fdroid/kotlin/org/meshtastic/app/analytics/FdroidPlatformAnalytics.kt a3c0a4832d139b9ed15cc2fdd22d9d2c0bef1db4 (a3c0a483) Text, 2.21 KB
T8b949e/*
* Copyright (c) 2025-2026 Meshtastic LLC
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
Tff7b72package T7ee787org.meshtastic.app.analytics
Tff7b72import T7ee787co.touchlab.kermit.Logger
Tff7b72import T7ee787co.touchlab.kermit.Severity
Tff7b72import T7ee787org.koin.core.annotation.Single
Tff7b72import T7ee787org.meshtastic.app.BuildConfig
Tff7b72import T7ee787org.meshtastic.core.repository.DataPair
Tff7b72import T7ee787org.meshtastic.core.repository.PlatformAnalytics
T8b949e/**
* F-Droid specific implementation of [PlatformAnalytics]. This provides no-op implementations for analytics and other
* platform services.
*/
Tf0883e@Single
Tff7b72class T56d364FdroidPlatformAnalytics Tb4b4b4: Te6edf3PlatformAnalytics Tb4b4b4{
Tff7b72init Tb4b4b4{
T8b949e// For F-Droid builds we don't initialize external analytics services.
T8b949e// In debug builds we attach a DebugTree for convenient local logging, but
T8b949e// release builds rely on system logging only.
Tff7b72if Tb4b4b4(Te6edf3BuildConfigTb4b4b4.Te6edf3DEBUGTb4b4b4) Tb4b4b4{
Te6edf3LoggerTb4b4b4.Te6edf3setMinSeverityTb4b4b4(Te6edf3SeverityTb4b4b4.Te6edf3DebugTb4b4b4)
Te6edf3LoggerTb4b4b4.Te6edf3i Tb4b4b4{ Ta5d6ff"Ta5d6ffF-Droid platform no-op analytics initialized (Debug mode).Ta5d6ff" Tb4b4b4}
Tb4b4b4} Tff7b72else Tb4b4b4{
Te6edf3LoggerTb4b4b4.Te6edf3setMinSeverityTb4b4b4(Te6edf3SeverityTb4b4b4.Te6edf3InfoTb4b4b4)
Te6edf3LoggerTb4b4b4.Te6edf3i Tb4b4b4{ Ta5d6ff"Ta5d6ffF-Droid platform no-op analytics initialized.Ta5d6ff" Tb4b4b4}
Tb4b4b4}
Tb4b4b4}
Tff7b72override Tff7b72fun Td2a8ffsetDeviceAttributesTb4b4b4(Te6edf3firmwareVersionTb4b4b4: Tffa657StringTb4b4b4, Te6edf3modelTb4b4b4: Tffa657StringTb4b4b4) Tb4b4b4{
T8b949e// No-op for F-Droid
Te6edf3LoggerTb4b4b4.Te6edf3d Tb4b4b4{ Ta5d6ff"Ta5d6ffSet device attributes called: firmwareVersion=Tffd700$Te6edf3firmwareVersionTa5d6ff, deviceHardware=Tffd700$Te6edf3modelTa5d6ff" Tb4b4b4}
Tb4b4b4}
Tff7b72override Tff7b72val Te6edf3isPlatformServicesAvailableTb4b4b4: Tffa657Boolean
Tff7b72getTb4b4b4(Tb4b4b4) Tff7b72= Tff7b72false
Tff7b72override Tff7b72fun Td2a8fftrackTb4b4b4(Te6edf3eventTb4b4b4: Tffa657StringTb4b4b4, Tff7b72vararg Te6edf3propertiesTb4b4b4: Te6edf3DataPairTb4b4b4) Tb4b4b4{
Te6edf3LoggerTb4b4b4.Te6edf3d Tb4b4b4{ Ta5d6ff"Ta5d6ffTrack called: event=Tffd700$Te6edf3eventTa5d6ff, properties=Tffd700${Te6edf3propertiesTb4b4b4.Te6edf3toListTb4b4b4(Tb4b4b4)Tffd700}Ta5d6ff" Tb4b4b4}
Tb4b4b4}
Tb4b4b4}
Served by rngit 1.5.2 - Generated in 0.13s